<table summary="" id="pagehead" cellpadding="0" cellspacing="0" border="0" width="100%">
	<tr>
		<td><h1>客户管理</h1></td>
		<td class="actions">
			<table summary="" cellpadding="0" cellspacing="0" border="0" align="right">
				<tr>
                	<td <?=$this->view_act ?>><a href="?app=customer&mod=operaudit">前台注册待审操作员列表</a></td>
                    <td <?=$this->auth_act ?>><a href="#">审核</a></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<?php if($this->opt=='view'): ?>
<script>
$(function(){
	// 删除
    $('img[del]').click(function (){
        var uid = $(this).attr('del');
        var nickname = $(this).attr('nickname');
        if(confirm('真的要删除'+nickname+'吗？')) {
            $.getJSON('?app=<?php echo APP; ?>&mod=usermanage&opt=delete',{uid:uid},function(data){
                if (data.state <= 0)
                {
                    alert(data.message);
                    return false;
                }
				//dialogMessage(data.message,'green');
				alert(data.message);
                $('tr[wparam='+uid+']').remove();
            });
        }
    });
	
});
</script>
<div class="t_2">
     <div class="fl">待审操作员列表</div>
     <div class="fr add_form"></div>
</div>
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="table1">
       <tr>
            <th class="th1">昵称</th>
            <th class="th0">登录名</th>
            <th class="th1">电话</th>
            <th class="th1">手机</th>
            <th class="th1">邮箱</th>
            <th class="th0">地址</th>
            <th class="th1">邮编</th>
            <th class="th0">所属客户</th>
            <th class="th1">注册时间</th>
            <th class="th1">操作</th>
       </tr>
       <?php foreach((array)$this->leaders as $leader): ?> 
       <tr wparam="<?php echo $leader['leader_id']; ?>">
            <td><?php echo $leader['realname']; ?></td>
            <td><?php echo $leader['username']; ?></td>
            <td><?php echo $leader['tel']; ?></td>
            <td><?php echo $leader['mobile']; ?></td>
            <td><?php echo $leader['email']; ?></td>
            <td><?php echo $leader['address']; ?></td>
            <td><?php echo $leader['zip']; ?></td>
            <td><?php echo $leader['customer_mark']; ?></td>
            <td><?php echo date('Y-m-d H:i',$leader['created_time']); ?></td>
            <td>
            <?php echo opt('yes','?app=customer&mod=operaudit&opt=auth&uid='.$leader['leader_id'],'title="审核操作员"'); ?>&nbsp;&nbsp;|&nbsp;&nbsp;
            <?php echo opt('trash','javascript:;','del="'.$leader['leader_id'].'" nickname="'.$leader['realname'].'" title="删除"'); ?>
            </td>
       </tr>
       <?php endforeach; ?>
</table>
<div class="page_num">
     <div class="fl">
        <span></span>
     </div>
     <div class="fr">
        <p class="cpager">
            <?php echo $this->pager; ?>
        </p>
     </div>
</div>
<?php elseif($this->opt=='auth'): ?>
<script>
$(function(){
	$('#post_form').submit(function(){
			if($('#customer_id').val()=='')
			{
				alert("所属客户不能为空!");
				return false;
			}
		if(confirm('是否确认审核！')) 
		{
			$.post(location.href,$(this).serialize(),function(data){
				alert(data.message);
				if (data.state == 1)
				{
					window.location="?app=customer&mod=operaudit";
				}
			},'json');
			return false;
		}
	});
});
</script>
<div class="line_1"></div>
<div class="edit_tab tab"><div class="bg1"><div class="bg2"><span class="span_now">操作员审核</span></div></div></div>
<div class="edit_div" style="display:block;">
    <div class="post_form" id="info_form">
	 <form id="post_form">
    <table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
		<tr>
			<td class="td1">注册填写客户名称：</td>
			<td><span><?=$this->leader['customer_mark']; ?></span></td>
		</tr>
        <tr>
			<td class="td2">所属客户：</td>
			<td><span>
            <?=$this->customers; ?>
            </span></td>
		</tr>
        <tr>
			<td class="td2">是否启用：</td>
			<td><span><input type="checkbox" name="enable" id="enable" checked="checked" value="1" /></span></td>
		</tr>
		<tr>
			<td class="td1">备注：</td>
			<td><textarea name="mark" id="mark"><?php echo $this->user['mark']; ?></textarea></td>
		</tr>
		<tr>
			<td colspan="2" style="text-align:center" class="td1">
            	<input type="submit" value="提交"  class="btn1"/>
                 <input type="hidden" id="leader_id" name="leader_id" value="<?=$this->leader['leader_id']; ?>"/>
            	<input name="" type="reset" class="btn1" value="重置" />
            </td>
		</tr>
     </table>
     </form>
	</div>
</div>
<?php endif; ?>